package com.lt.flashcard.view;

import org.zkoss.bind.annotation.BindingParam;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zul.Window;

public class AdminProductUpdateCtrl {

	boolean setimage = true;
	boolean setdetail = true;
	boolean cardimage = true;
	boolean carddetail = true;
	int settotal;
	
	V_AdminFlashcardSetListCtrl parent = null;
	
	@Init
	public void doAfterCompose(Component comp) throws Exception {
		settotal = (Integer) Executions.getCurrent().getArg().get("count");
		parent = (V_AdminFlashcardSetListCtrl) Executions.getCurrent().getArg().get("parent");
	}
	
	@Command
	public void ok(@BindingParam("win") Window win) {
		parent.doScheduleUpdateFlashcardSet(setimage, setdetail, cardimage, carddetail);
		win.detach();
	}

	public boolean isSetimage() {
		return setimage;
	}

	public void setSetimage(boolean setimage) {
		this.setimage = setimage;
	}

	public boolean isSetdetail() {
		return setdetail;
	}

	public void setSetdetail(boolean setdetail) {
		this.setdetail = setdetail;
	}

	public boolean isCardimage() {
		return cardimage;
	}

	public void setCardimage(boolean cardimage) {
		this.cardimage = cardimage;
	}

	public boolean isCarddetail() {
		return carddetail;
	}

	public void setCarddetail(boolean carddetail) {
		this.carddetail = carddetail;
	}

	public int getSettotal() {
		return settotal;
	}

	public void setSettotal(int settotal) {
		this.settotal = settotal;
	}
}
